import { network } from '@/utils';
import { TableListParams, SaveExpressParams, UpdateTypeParams } from './data';

import { basic } from '../../../../../config/Apis';

export async function queryExpressList(params: TableListParams) {
  return network.get(basic.logis_logisExpressList, {
    params,
  });
}

export async function queryWorkMode() {
  return network.get(basic.logis_operatingType);
}

export async function queryLogistics(params: TableListParams) {
  return network.get(basic.express_list, {
    params,
  });
}

export async function operSaveExpress(params: SaveExpressParams) {
  return network.post(basic.logis_logisExpress, {
    data: params,
  });
}

export async function operEeleteExpress(params: SaveExpressParams) {
  return network.deleter(basic.logis_logisExpressById, {
    params,
  });
}

export async function operUpdateTypeExpress(params: UpdateTypeParams) {
  return network.put(basic.logis_workMode, {
    params,
  });
}
